package com.gxh.controller.admin;

import com.gxh.dto.UserHistoryPageQueryDTO;
import com.gxh.result.PageResult;
import com.gxh.result.Result;
import com.gxh.service.UserHistoryService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("AdminUserHistoryController")
@RequestMapping("/admin/user_history")
@Slf4j
@Api(tags = "用户历史记录管理")
public class UserHistoryController {

    @Autowired
    private UserHistoryService userHistoryService;

    @GetMapping("/page")
    public Result<PageResult> page(UserHistoryPageQueryDTO userHistoryPageQueryDTO){
        log.info("用户历史分页查询:{}", userHistoryPageQueryDTO);
        PageResult pageResult = userHistoryService.pageQuery(userHistoryPageQueryDTO);
        return Result.success(pageResult);
    }

}
